<div class="container">
  <div class="row">
    <div class="col-12 col-sm-8 offset-sm-2 col-md-6 offset-md-3 mt-5 pt-3 pb-3 bg-white from-wrapper">
      <div class="container">
        <h3>管理员注册</h3>
        <hr>
        <form class="" action="/register" method="post">
          <div class="row">
            <div class="col-12 col-sm-6">
              <div class="form-group">
               <label for="username">用户名</label>
               <input type="text" class="form-control" name="username" id="username" value="<?= set_value('username') ?>">
              </div>
            </div>
            <div class="col-12 col-sm-6">
              <div class="form-group">
               <label for="realname">真实名字</label>
               <input type="text" class="form-control" name="realname" id="realname" value="<?= set_value('realname') ?>">
              </div>
            </div>
            <div class="col-12 col-sm-6">
              <div class="form-group">
               <label for="mobile">手机号</label>
               <input type="text" class="form-control" name="mobile" id="mobile" value="<?= set_value('mobile') ?>">
              </div>
            </div>
            <div class="col-12 col-sm-6">
              <div class="form-group">
               <label for="status" style="width: 100%;">状态</label>
               <div class="btn-group btn-group-toggle" data-toggle="buttons" style="clear: both;">
                  <label class="btn btn-secondary active">
                    <input type="radio" name="status" id="option1" value="1" checked> 启用
                  </label>
                  <label class="btn btn-secondary">
                    <input type="radio" name="status" id="option2" value="99"> 禁用
                  </label>
                </div>
              </div>
            </div>
            <div class="col-12">
              <div class="form-group">
               <label for="desc">备注</label>
               <input type="text" class="form-control" name="desc" id="desc" value="<?= set_value('desc') ?>">
              </div>
            </div>
            <div class="col-12 col-sm-6">
              <div class="form-group">
               <label for="password">密码</label>
               <input type="password" class="form-control" name="password" id="password" value="">
             </div>
           </div>
           <div class="col-12 col-sm-6">
             <div class="form-group">
              <label for="password_confirm">密码确认</label>
              <input type="password" class="form-control" name="password_confirm" id="password_confirm" value="">
            </div>
          </div>
          <?php if (isset($validation)): ?>
            <div class="col-12">
              <div class="alert alert-danger" role="alert">
                <?= $validation->listErrors() ?>
              </div>
            </div>
          <?php endif; ?>
          </div>

          <div class="row">
            <div class="col-12 col-sm-4">
            	<?php echo csrf_field();?>
              <button type="submit" class="btn btn-primary">注册</button>
            </div>
            <div class="col-12 col-sm-8 text-right">
              <a href="/login">已有账户点我</a>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
